#include "ThreadPool.hpp"
#include "Task.hpp"
#include <memory>


int main()
{
    std::unique_ptr<ThreadPool<Task>> threadpoll = std::make_unique<ThreadPool<Task>>(3);
    threadpoll->InitThreadPool();
    threadpoll->Start();

    for(int i = 0;i<3;i++)
    {
        srand(time(nullptr));
        int a = rand() % 10 + 1*i;
        usleep(1234);
        int b = rand() % 5 + 1*i;
        Task t(a,b);
        threadpoll->Push(t);
    }
    threadpoll->Stop();
    threadpoll->Wait();
    return 0;
}